using System;
using System.Collections;
using System.ServiceModel;

namespace Caramel.ServiceModel
{
	public class PerCallLocalStorageExtension : IExtension<OperationContext>
	{
		public Hashtable Items { get; private set; }

		#region IExtension<InstanceContext> Members

		public void Attach(OperationContext owner)
		{
			this.Items = new Hashtable();
		}

		public void Detach(OperationContext owner)
		{
			this.Items = null;
		}

		#endregion
	}
}
